import request from '@/utils/request'

//获取考试批次
export function listTime() {
  return request({
    url: '/coffee/judgment/examTime',
    method: 'get',
  })
}

//获取某个批次下的所有考试（两个工位的两个人）
export function listExam(time) {
  return request({
    url: '/coffee/judgment/examBytime?startTime='+time,
    method: 'get',
  })
}

//获取题目
export function listPaper(examId) {
  return request({
    url: '/coffee/judgment/paper?paperId='+examId,
    method: 'get',
  })
}

//更新分数
export function updateScore(qid,qScore) {
  return request({
    url: '/coffee/judgment/submit',
    method: 'post',
    data: [{
      "id": qid,
      "score": qScore
    }]
  })
}

//严重错误
export function reportCriticalError(paperId, stemId) {
  return request({
    url: '/coffee/judgment/isStudentError?paperId='+paperId+'&stemId='+stemId,
    method: 'get',
  })
}

//报告缺考
export function reportAbsent(paperId) {
  return request({
    url: '/coffee/judgment/isStudentAbandon?id='+paperId,
    method: 'get',
  })
}

//结束考试
export function finishExam(tid,examId) {
  return request({
    url: '/coffee/judgment/isFinish?isFinish=1&examJudgerUserId='+tid+'&examId='+examId,
    method: 'get',
  })
}
